home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
ftp.barnyard.co.uk
/
2015.02.ftp.barnyard.co.uk.tar
/
ftp.barnyard.co.uk
/
cpm
/
walnut-creek-CDROM
/
COMMODOR
/
TELCHESS
/
TELE-CHESS 1.4
(
.txt
)
< prev
next >
Wrap
Commodore BASIC
|
2000-06-30
|
9KB
|
304 lines
0 IFPEEK(829)<>254THENPOKE829,254:LOAD"CHESS.CHRSET",8,1
2 POKE53272,56:POKE53265,27:POKE56576,196:POKE53270,200:POKE648,204:PRINT"[147]"
3 POKE53280,0:POKE53281,0:POKE53282,10:POKE53283,1
4 PRINT"[144]"CHR$(8):POKE56,158:CLR:OPEN5,2,0,CHR$(6)+CHR$(0)
5 X=1:Y=7:POKE53270,PEEK(53270)OR16:POKE53285,7:FL=1:GOSUB1200:PRINT#5,MO$:S=54272
6 DO$=""
8 TI$="000000":JT=2
10 PRINT"[147]"
21 DIMSI(24)
25 DIMB(8,8),PI$(13),BB(8,8):CA$="[129][149][150][151][152][153][154][155]":CH$(0)="[151]":CH$(1)="[154]":BS=6:WS=3
26 PI$(0)=" [157][157][157] [146][145]"
27 PI$(1)=" [157][157][157] [146][145]"
28 PI$(2)="[176][174][172][157][157][157][173][189][188][145]"
29 PI$(3)="[193][211][196][157][157][157][218][216][195][145]"
30 PI$(4)="[178][163][183][157][157][157][184][162][185][145]"
31 PI$(5)="[210][212][217][157][157][157][213][201][207][145]"
32 PI$(6)="[190][191][170][157][157][157][173][189][188][145]"
33 PI$(7)="[214][194][206][157][157][157][218][216][195][145]"
34 PI$(8)="[187][165][180][157][157][157][173][189][188][145]"
35 PI$(9)="[198][199][200][157][157][157][218][216][195][145]"
36 PI$(10)="[181][161][182][157][157][157][173][189][188][145]"
37 PI$(11)="[202][203][204][157][157][157][218][216][195][145]"
38 PI$(12)="[171][179][177][157][157][157][166][220][168][145]"
39 PI$(13)="[209][215][197][157][157][157][219][221][169][145]"
40 GOTO195
100 REM ***PRINT BOARD***
110 PRINT"";:FORN=1TO8:VA=(INT(N/2)*2=N)*-1:FORO=1TO8
130 CP=0:CH=B(N,O):IFCH>9THENCP=1:CH=CH-10
140 PRINTCH$(VA)PI$((CH*2)+CP);:VA=(VA+1)AND1:NEXT:PRINT:PRINT:PRINT"";:NEXT
150 RETURN
195 TI$="000000":PRINT"[147]"LEFT$(DO$,11)SPC(15)"[155]PLEASE WAIT":GOSUB200
196 PRINT"[147]":POKE53265,PEEK(53265)AND239:GOSUB100:GOSUB1300
197 GOSUB1600:GOSUB700:GOSUB711:POKE53265,PEEK(53265)OR16:GOTO720
200 REM *** PIECE MEMORY ***
220 FORN=1TO8:FORM=1TO8:READB(N,M):NEXT:NEXT:IFFL=0THENGOSUB1600:X=4:GOTO6000
221 FORN=1TO8:FORI=1TO8
222 IF(B(N,I)<10 AND B(N,I)>0)THENB(N,I)=B(N,I)+10:GOTO224
223 IFB(N,I)>10THENB(N,I)=B(N,I)-10
224 NEXT:NEXT:B(1,4)=15:B(1,5)=16:B(8,4)=5:B(8,5)=6:GOSUB1600:GOTO6000
230 DATA 4,2,3,6,5,3,2,4
240 DATA 1,1,1,1,1,1,1,1
250 DATA 0,0,0,0,0,0,0,0
260 DATA 0,0,0,0,0,0,0,0
270 DATA 0,0,0,0,0,0,0,0
280 DATA 0,0,0,0,0,0,0,0
290 DATA 11,11,11,11,11,11,11,11
295 DATA 14,12,13,16,15,13,12,14
500 REM *** ELECT PAWN ***
510 B(F1,F2)=5+10*V:RETURN
600 REM *** MOVE PIECE ***
605 GOSUB1600:IFOK<>1THENRETURN
606 IFB(S1,S2)=0THENRETURN
607 GI=1:GOSUB850
610 C=B(F1,F2):A=B(S1,S2):B(S1,S2)=0:B(F1,F2)=A
611 V=0:IFA>9THENV=1
612 SF=0:IFC<>0THENSF=1
616 IF(A=1ORA=11)AND(F1=8ORF1=1)THENGOSUB500
620 VV=1:IF(INT(S2/2)*2=S2)=(INT(S1/2)*2=S1)THENVV=0
621 JT=2:FORI=0TO5
622 PRINT"[149]"LEFT$(DO$,(S1-1)*2)SPC((S2-1)*3)PI$((A-V*10)*2+V):GOSUB5000
623 PRINT"[129]"LEFT$(DO$,(S1-1)*2)SPC((S2-1)*3)PI$((A-V*10)*2+V):GOSUB5000
626 NEXT
627 PRINT""LEFT$(DO$,(S1-1)*2)SPC((S2-1)*3)CH$(VV)PI$(0)
630 CP=0:CH=B(F1,F2):IFCH>9THENCP=1:CH=CH-10
633 VV=1:IF(INT(F2/2)*2=F2)=(INT(F1/2)*2=F1)THENVV=0
634 IFSF=1THENGOSUB6050
635 IFSF=0THENGOSUB850
636 FORI=0TO5
637 PRINT"[149]"LEFT$(DO$,(F1-1)*2)SPC((F2-1)*3)PI$((CH*2)+CP):GOSUB5000
638 PRINT"[129]"LEFT$(DO$,(F1-1)*2)SPC((F2-1)*3)PI$((CH*2)+CP):GOSUB5000
639 NEXT
640 PRINT""CH$(VV)LEFT$(DO$,(F1-1)*2)SPC((F2-1)*3)PI$((CH*2)+CP)
670 GI=5:RETURN
700 REM *** SPRITE SET-UP ***
701 SX=28+(X*24):SY=50+(Y*16):POKE53276,PEEK(53276)OR1:POKE53287,0
710 POKE53240,160:POKE53269,1:POKE53248,SX:POKE53249,SY:RETURN
711 POKE198,3:POKE631,79:POKE632,75:POKE633,13:POKE53280,0:RETURN
720 JV=ABS((PEEK(56320)AND31)-31)
730 IFJV=0THEN900
735 JT=5:GOSUB5000:JT=2
740 IFJV=1ANDY>1THENY=Y-1
750 IFJV=2ANDY<8THENY=Y+1
760 IFJV=4ANDX>1THENX=X-1
770 IFJV=8ANDX<8THENX=X+1
775 IFJV=16ANDIL=0THENIL=1:GOSUB800:GOTO720
776 IFJV=16ANDIL=1THENIL=0:GOTO790
780 GOSUB700:GOTO720
790 GOSUB800:IF(S1=F1)AND(S2=F2)THENGOTO720
795 GOSUB1100:GOSUB600:GOTO720
800 REM *** BUTTON PRESSED ***
801 IF(IL=1)AND(B(Y,X)=0)THENIL=0:RETURN
810 IFIL=1THENPOKE53285,14:S1=Y:S2=X
820 IFIL=0THENPOKE53285,7:F2=X:F1=Y
825 JV=ABS((PEEK(56320)AND31)-31)
830 IFJV=16THEN825
840 S=54272:GI=3
850 POKES+4,64:POKES+22,45:POKE S+1,7+GI
851 POKE S+5,9
852 POKE S+6,9
854 POKE S+4,65
855 FOR D=1 TO 20: NEXT D
856 FOR D=1 TO 20: NEXT D
857 POKE S+4,64
858 RETURN
900 REM *** CHAT MODE ***
905 PRINT"[155]"LEFT$(DO$,21)SPC(31)LEFT$(TI$,2)":"MID$(TI$,3,2);
906 PRINT"[151][145][145][157][157][157][157][157][157]ELAPSED"
910 GETA$:IFA$=""THEN940
911 IFASC(A$)>132ANDASC(A$)<141THENGOTO2000
913 IFA$=CHR$(13)THENA$="... ":GOTO916
914 IFA$=CHR$(20)ANDLEN(T$)>0THEN916
915 IFASC(A$)<32ORASC(A$)>90THEN940
916 PRINT#5,A$;:IFA$=CHR$(20)THENA$="":T$=LEFT$(T$,LEN(T$)-1)
920 T$=T$+A$:T$=RIGHT$(T$,24):PRINT""BB$LEFT$(DO$,21)" "T$" ":GOTO910
940 GET#5,A$:IFA$=""THEN720
941 IFA$=CHR$(254)THENGOSUB1000:GOTO720
942 IFA$=CHR$(1)THENPRINT#5,CHR$(226);:GOTO720
944 IFA$=CHR$(20)ANDLEN(Y$)>0THEN946
945 IFASC(A$)<32ORASC(A$)>90THEN940
946 IFA$=CHR$(20)THENA$="":Y$=LEFT$(Y$,LEN(Y$)-1)
950 Y$=Y$+A$:Y$=RIGHT$(Y$,24):PRINT""AA$LEFT$(DO$,19)" "Y$" ":GOTO720
1000 REM **** RECEIVE THE MOVE ****
1004 OK=0:GET#5,A$:IFA$<>""THEN1004
1006 RE=1:PRINT#5,CHR$(1);:TL=TI+300
1007 GET#5,A$:IFA$<>""THEN1020
1010 IFTI<TLTHEN1007
1015 GOTO1070
1020 IFA$=CHR$(226)THENRETURN
1030 RE%(RE)=ASC(A$+CHR$(0)):RE=RE+1:IFRE<6THENGOTO1007
1040 CK=RE%(1)+RE%(2)+RE%(3)+RE%(4):IFCK<>RE%(5)THEN1070
1050 PRINT#5,CHR$(6);
1060 OK=1:S1=RE%(1):S2=RE%(2):F1=RE%(3):F2=RE%(4):GOSUB600:RETURN
1070 PRINT#5,CHR$(9);:TL=TI+300
1080 GET#5,A$:IFA$=CHR$(254)THEN1006
1090 IFTI<TLTHEN1080
1095 RETURN
1100 REM **** SEND THE MOVE ****
1105 OK=0:SY=9-S1:SX=9-S2:FY=9-F1:FX=9-F2:CK=SY+SX+FY+FX:TR=0
1110 TL=TI+300:PRINT#5,CHR$(254);
1120 GET#5,A$:IFA$<>""THEN1140
1130 IFTI<TLTHEN1120
1135 TR=TR+1:IFTR<10THENGOTO1110
1136 IFTR=10THENRETURN
1140 IFA$<>CHR$(1)THENGOTO1110
1145 PRINT#5,CHR$(SY)CHR$(SX)CHR$(FY)CHR$(FX)CHR$(CK);
1150 TL=TI+300
1160 GET#5,A$:IFA$<>""THEN1170
1165 IFTI<TLTHEN1160
1170 IFA$<>CHR$(6)THEN1110
1180 OK=1:RETURN
1200 REM *** TITLE SCREEN ***
1201 POKE 53269,0
1202 PRINT"[147][149]TELEGAME SOFTWARE PRESENTS...
1203 [153]"LISTTELE-CHESS 64 #VERIFY1986
1204 PRINT"[151]FREEWARE VERSION 1.4
1205 [153]"VERIFYTO BECOME A REGISTERED USER, PLEASE SEND";
1206 [153]"$20.00 TO TELEGAME SOFTWARE, SUB PO 37,
1207 PRINT"SASKATOON, SASK. CANADA. THIS WILL PUT
1208 [153]"YOU ON AN UPDATE LIST. HAVE FUN...
1210 PRINTSPC(11)"[154][176][174][172][151][178][163][183][154][181][161][182][151][187][165][180][154][176][174][172]"
1211 PRINTSPC(11)"[154][173][189][188][151][184][162][185][154][173][189][188][151][173][189][188][154][173][189][188]"
1212 PRINTSPC(12)"[155]TELE-CHESS 64"
1213 PRINTSPC(11)"[151][193][211][196][154][210][212][217][151][202][203][204][154][198][199][200][151][193][211][196]"
1214 PRINTSPC(11)"[151][218][216][195][154][213][201][207][151][218][216][195][154][218][216][195][151][218][216][195]"
1220 PRINT"[155]BY TOM CONROY AND JAMES HASTINGS-TREW"
1222 TL=TI+1800:PRINT"[149]INSTRUCTIONS? (Y/N)
1223 [161]IN$
1224 [139]IN$[179][177]""[167]1227
1225 [139]TI[179]TL[167]1223
1226 [141]7000:[137]1200
1227 [139]IN$[178]"Y"[167][141]2400
1230 [133]"POKE YOUR NAMEVERIFY";NA$
1235 [133]"POKE OPPONENTS NAMEVERIFY";NO$
1236 [133]"POKE MODEM COMMANDVERIFY";MO$
1240 [133]"POKE BLACK OR WHITEVERIFY";CL$
1250 [139]CL$[178]"B"[167]FL[178]0:[137]1280
1260 [139]CL$[178]"W"[167]FL[178]1:[137]1280
1270 [137]1240
1280 [142]
1300 [143] *** PRINT NAMES ***
1305 AA$[178]"VERIFY":BB$[178]"POKE":[139]FL[167]AA$[178]"POKE":BB$[178]"VERIFY"
1310 [153]""[166]27)AA$[200](NO$,10)
1316 [153][166]28)"VERIFYF1WAITLIST = UNDO"
1317 [153][166]28)"VERIFYF2WAITLIST = RESET"
1320 [153][166]28)"VERIFYF3WAITLIST = SAVE"
1321 [153][166]28)"VERIFYF4WAITLIST = LOAD"
1322 [153][166]28)"VERIFYF5WAITLIST = MODEM"
1323 [153][166]28)"VERIFYF6WAITLIST = MODIFY"
1324 [153][166]28)"VERIFYF7WAITLIST = CHECK"
1325 [153][166]28)"VERIFYF8WAITLIST = COLOUR"
1326 [153]""[166]27)BB$[200](NA$,10)
1327 [153]""[200](DO$,24)[166]11)"LIST-TELEGAME SOFTWARE-";
1328 [142]
1600 [143] *** OOPS ***
1610 [129]N[178]1[164]8:[129]I[178]1[164]8:BB(N,I)[178]B(N,I):[130]:[130]:[142]
1700 [143] *** OPPS PRESSED ***
1705 [153]"LIST"[166]28)"*UNDOING*"
1710 [129]N[178]1[164]8:[129]I[178]1[164]8:B(N,I)[178]BB(N,I):[130]:[130]:[141]100
1715 [153]"VERIFY"[166]28)"VERIFYF1WAITLIST = UNDO":[142]
1800 [143] *** SAVE GAME ***
1810 FI$[178]"":[153]""[200](DO$,7)[166]28);"VERIFY CMDCMDCMDCMDCMDCMDCMDCMDCMDCMD";:[133]FI$
1811 [139]FI$[178]""[167]1840
1820 [160]15:[159]15,8,15:[160]2:[159]2,8,2,FI$[170]",S,W":[129]N[178]1[164]8:[129]I[178]1[164]8
1830 [152]2,B(N,I):[130]:[130]:[160]2:[160]15
1840 [153]""[200](DO$,7)[166]28)"VERIFYF3WAITLIST = SAVE":[142]
1900 [143] *** LOAD GAME ***
1910 FI$[178]"":[153]""[200](DO$,8)[166]28)"VERIFY CMDCMDCMDCMDCMDCMDCMDCMDCMDCMD";:[133]FI$
1911 [139]FI$[178]""[167]1940
1920 [160]15:[159]15,8,15:[160]2:[159]2,8,2,FI$[170]",S,R":[129]N[178]1[164]8:[129]I[178]1[164]8
1930 [132]2,B(N,I):[130]:[130]:[160]2:[160]15:
1940 [141]100:[153]""[200](DO$,8)[166]28)"VERIFYF4WAITLIST = LOAD":[142]
2000 [143] *** FUNCTION KEYS ***
2010 [139]A$[178]"INPUT"[167][141]1700
2020 [139]A$[178]"GOTO"[167]FL[178](FL[170]1)[175]1:[140]:TI$[178]"000000":[137]195
2030 [139]A$[178]"DIM"[167][141]1800
2040 [139]A$[178]"RUN"[167][141]1900
2050 [139]A$[178]"READ"[167][141]2100
2060 [139]A$[178]"IF"[167][141]2200
2070 [139]A$[178]"RESTORE"[167][141]3000
2080 [139]A$[178]"LET"[167][141]4000
2099 [137]913
2100 [143] *** MODEM COMMAND ***
2110 [153]""[200](DO$,9)[166]28)"VERIFY CMDCMDCMDCMDCMDCMDCMDCMDCMDCMDCMD";:[133]MC$
2120 [152]5,MC$
2125 [153]""[200](DO$,9)[166]28)"VERIFYF5WAITLIST = MODEM":[142]
2200 [143] *** MODIFY THE BOARD ***
2210 [141]2300:[153]""[200](DO$,18);"POKE WHAT PIECE WOULD YOU LIKE TO PLACE AT "
2220 [153]" THE CURRENT POINTER POSITION?"
2221 [153]"VERIFY 0=LISTSPACEWAIT VERIFY 1=LISTPAWNWAIT VERIFY2=LISTKNIGHTWAIT VERIFY3=LISTBISHOPWAIT"
2230 [153]" VERIFY4=LISTROOKWAIT VERIFY5=LISTQUEENWAIT VERIFY6=LISTKINGWAIT"
2235 [153]"VERIFY PRESS RETURN TO ABORT":
2240 [161]B$:[139]B$[178]""[167]2240
2250 [139]B$[178][199](13)[167][141]2300:[142]
2260 [139][197](B$)[179]0[176][197](B$)[177]6[167]2240
2261 B[178][197](B$):[139]B[177]0[167][153]"ON POKEBLACK LISTOR VERIFYWHITE LIST(B/W)?"
2265 [139]B[178]0[167]AD[178]0:[137]2270
2266 [161]B$:[139]B$[179][177]"B"[175]B$[179][177]"W"[167]2266
2267 AD[178]0:[139]B$[178]"B"[167]AD[178]10
2270 B(Y,X)[178]B[170]AD:F1[178]Y:F2[178]X:[141]630:[141]2300:[142]
2300 [143] *** CLEAR BOTTOM OF SCREEN **
2310 [129]N[178]18[164]23:[153]"";[200](DO$,N);" "
2320 [130]:[142]
2400 [143] *** INSTRUCTIONS ***
2410 [160]15:[159]15,8,15:[160]2:[159]2,8,2,"TELE-CHESS.DOC,S,R":[153]"LOADVERIFY"
2420 C[178]C[170]1:[132]2,A$:[139]A$[178]"END"[167][160]2:[141]2500:[142]
2425 [153]A$
2430 [139]C[178]21[167]C[178]0:[153]"POKE RETURN TO CONTINUEVERIFY":[141]2500
2440 [137]2420
2500 [143] *** WAIT ***
2510 [161]B$:[139]B$[178]""[167]2510
2520 [153]"LOAD":[142]
3000 [143] *** ALTER COLOURS ***
3010 [141]2300:[153]""[200](DO$,18)"POKE PRESS FUNCTION KEY TO ALTER COLOURS"
3020 [153]" OR PRESS LISTRETURNWAITPOKE TO EXIT"
3030 [153]" LISTF1WAITVERIFY = BLACK PIECES LISTF3WAITVERIFY = WHITE PIECES"
3040 [153]" LISTF5WAITVERIFY = BLACK SQUARES LISTF7WAITVERIFY = WHITE SQUARES"
3050 [161]B$:[139]B$[178]""[167]3050
3060 [139]B$[178][199](13)[167][141]2300:[142]
3070 [139]B$[178]"INPUT"[167]A[178][194](53282)[175]15:A[178](A[170]1)[175]15:[151]53282,A
3080 [139]B$[178]"DIM"[167]A[178][194](53283)[175]15:A[178](A[170]1)[175]15:[151]53283,A
3090 [139]B$[178]"READ"[167]BS[178](BS[170]1)[175]7:CH$(1)[178][202](CA$,BS[170]1,1):[141]100
3100 [139]B$[178]"LET"[167]WS[178](WS[170]1)[175]7:CH$(0)[178][202](CA$,WS[170]1,1):[141]100
3110 [137]3050
4000 [143] *** PRINT CHECK ****
4010 B$[178]"CHECK":[129]I[178]0[164]4:[151]631[170]I,[198]([202](B$,I[170]1,1)):[130]:[151]631[170]I,13
4020 [151]198,6:[142]
5000 [143] *** WAIT FOR 2 JIFFIES ***
5010 TL[178]TI[170]JT
5020 [139]TI[179]TL[167]5020
5030 [142]
6000 [129]J[178]0[164]24:[135] Z:SI(J)[178]Z:[151]S[170]J,Z:[130]:[142]
6010 [131] 0,4,0,12,64,10,0
6020 [131] 0,0,0,12,64,12,0
6030 [131] 0,4,0,12,128,12,0
6040 [131] 0,50,245,47
6050 [129]J[178]0[164]24:[151]54272[170]J,SI(J):[130]
6060 [151]54276,64:[151]54290,128:[151]54276,65:[151]54290,129:[142]
7000 [143] *** ADVERTISEMENT ***
7010 [153]"LOADVERIFYALSO AVAILABLE FROM TELEGAME SOFTWARE:"
7020 [153]"POKE THE STOCK EXCHANGE"
7030 [153]"VERIFYMUCH MORE THAN JUST ANOTHER BBS PROGRAM,";
7040 [153]"POKETHE STOCK EXCHANGE VERIFYBRINGS ALL THE FUN"
7050 [153]"AND EXCITEMENT OF MULTI-PLAYER GAMEING"
7060 [153]"RIGHT INTO YOUR HOME. WITH A MODEM, C64"
7070 [153]"OR C128 COMPUTER, AND A 1541 DISK DRIVE"
7080 [153]"YOU CAN CONTROL THE ACTION AS UP TO 50"
7090 [153]"USERS COMPETE IN THIS STIMULATING AND"
7100 [153]"FUN STOCK MARKET SIMULATION. THE PROGRAM";
7110 [153]"ALSO HAS A FULL MESSAGE SECTION, FOR"
7120 [153]"PUBLIC CONFERENCES OR PRIVATE ELECTRONIC";
7130 [153]"MAIL. THERE ARE ALSO EXTENSIVE OPTIONS"
7140 [153]"AVAILABLE TO THE SYSOP THAT MAKE THIS"
7150 [153]"PROGRAM A BREEZE TO OPERATE AND A"
7160 [153]"PLEASURE TO OWN. IF YOU LIKE LISTTELE-CHESSVERIFY"
7170 [153]"THEN YOU WILL LOVE POKETHE STOCK EXCHANGEVERIFY!"
7180 [153]"POKEONLY $89.95 FROM VERIFYTELEGAME SOFTWARE
7190 PRINT" SUB PO 37"
7200 PRINT" SASKATOON,SASK
7210 [153]" CANADA, S7H 0X0
7220 PRINT"[155]TRY IT OUT AT [151](306) 373-0798"
7230 TL=TI+1800
7235 GETA$:IFA$=""THENIFTI<TLGOTO7235
7240 RETURN